<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <canvas id="canvas" width="400" height="400"></canvas>
    <script src="utils.js"></script>
    <script>
        window.onload = function(){
            var canvas = document.getElementById('canvas')
            function onMouseEvent(event){
                console.log(event.type)
            }

            canvas.addEventListener('mousedown', onMouseEvent, false)
            canvas.addEventListener('mouseup', onMouseEvent, false)
            canvas.addEventListener('click', onMouseEvent, false)
            canvas.addEventListener('dbclick', onMouseEvent, false)
            canvas.addEventListener('mousewheel', onMouseEvent, false)
            canvas.addEventListener('mousemove', onMouseEvent, false)
            canvas.addEventListener('mouseover', onMouseEvent, false)
            canvas.addEventListener('mouseout', onMouseEvent, false)
            
        }
    </script>
</body>
</html>